package priv.tuyou.bo;

import java.util.ArrayList;
import java.util.List;

/**
 * 分页实体
 * @author：涂有
 * @date 2016年12月31日 下午5:35:46
 */
public class Page<T> {

	/**
	 * 分页起始行数
	 */
	protected long pageStart;
	
	/**
	 * 分页大小，默认30条
	 */
	protected int pageSize = 30;
	
	/**
	 * 总行数
	 */
	protected long totalCount;
	
	/**
	 * 分页里面包含的数据列表
	 */
	protected List<T> data = new ArrayList<T>();
	
	public Page(long start, int pageSize){
		
		this.pageStart = start;
		this.pageSize = pageSize;
	}
	
	public void set(long totalCount, List<T> data){
		
		this.totalCount = totalCount;
		this.data = data;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public long getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(long totalCount) {
		this.totalCount = totalCount;
	}

	public List<T> getData() {
		return data;
	}

	public void setData(List<T> data) {
		this.data = data;
	}

	public long getPageStart() {
		return pageStart;
	}

	public void setPageStart(long pageStart) {
		this.pageStart = pageStart;
	}

}